home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4927 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  875 b 

  1. Path: mail2news.demon.co.uk!ues5.cern.ch
  2. From: Dan Pop <Dan.Pop@cern.ch>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: RETURN ();
  5. Date: Sun, 11 Feb 1996 21:51:18 +0100
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <9602112051.AA01753@ues5.cern.ch>
  8. References: <DMFxxq.7M7@emi.net> <4fkrpo$mk7@felix.teclink.net>
  9. X-NNTP-Posting-Host: ues5.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11. X-Mail2News-Path: mail1.cern.ch!ues5.cern.ch
  12.  
  13. John Kleinjans <johnk@teclink.net> writes:
  14.  
  15. >(If anyone out there knows how a function CAN return >1 value, please 
  16. >tell me. I prefer to be right.)
  17.  
  18. It depends on what you mean by "value".  How about this one:
  19.  
  20. typedef struct {int a, b, c;} foo;
  21.  
  22. foo bar()
  23. {
  24.     foo temp = {1, 2, 3};
  25.     return temp;
  26. }
  27.  
  28. Dan
  29. -- 
  30. Dan Pop
  31. CERN, CN Division
  32. Email: danpop@mail.cern.ch 
  33. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  34.